<!DOCTYPE html>
<html>
<head>
    
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    
    <title>{$title} {:C('WEB_SITE_TITLE')}</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    
    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="__CSS__/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__CSS__/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__CSS__/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__CSS__/animate.min.css" rel="stylesheet">
    <link href="__CSS__/style.min862f.css?v=4.1.0" rel="stylesheet">
    
    <script src="__JS__/jquery.min.js?v=2.1.4"></script>
    <style>
        .disable{
            display: none;
        }
    </style>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>{$title}</h5>
            <!--<div class="ibox-tools">-->
                <!--<a class="collapse-link">-->
                    <!--<i class="fa fa-chevron-up"></i>-->
                <!--</a>-->
                <!--<a class="dropdown-toggle" data-toggle="dropdown" href="#">-->
                    <!--<i class="fa fa-wrench"></i>-->
                <!--</a>-->
                <!--<ul class="dropdown-menu dropdown-user">-->
                    <!--<li><a href="#">选项1</a>-->
                    <!--</li>-->
                    <!--<li><a href="#">选项2</a>-->
                    <!--</li>-->
                <!--</ul>-->
                <!--<a class="close-link">-->
                    <!--<i class="fa fa-times"></i>-->
                <!--</a>-->
            <!--</div>-->
        </div>
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
    
                    <include file="Common/alert"/>
    
                    <div class="clearfix" style="width:100%;">
                        <div class="bars pull-left">
                            <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
                                <button type="button" class="btn btn-outline btn-default" href="{:U('Item/index')}" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-chevron-left" aria-hidden="true"></i>
                                </button>
                                <button type="button" class="btn btn-outline btn-default" href="{:U('Item/edit')}" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
                                </button>
                                <button class="btn btn-default btn-outline" type="button" name="refresh" title="刷新" href="__SELF__" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-repeat"></i>
                                </button>
                                <button type="button" class="btn btn-outline btn-default confirm" href="{:U('Item/delete',['id'=>$info['id']])}" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
                                </button>
                            </div>
                        </div>
                    </div>
    
                    <form method="post" action='<eq name="_GET.type" value="check">{:U("Item/check")}<else/>__SELF__</eq>' class="form-horizontal">
    
                        <if condition="I('get.type','') eq 'check'">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">审核状态
                                <!--<br><small class="text-navy">自定义样式</small>-->
                            </label>
            
                            <div class="col-sm-10">
                                    <volist name=":C('ITEM_STATUS')" id="status">
                                        <div class="radio i-checks">
                                            <label>
                                                <input type="radio" value="{$key}" name="status" <eq name="info.status" value="$key">checked="checked"</eq>> <i></i>  {$type}{$status}
                                            </label>
                                        </div>
                                    </volist>
                            </div>
                        </div>
                        </if>
    
                        <div class="hr-line-dashed"></div>
                        
                        <div class="form-group">
                            <label class="col-sm-2 control-label">审核记录
                            </label>
        
                            <div class="col-sm-10" style="    padding-top: 6px;">
                                <if condition="!empty($info['check_records'])">
                                    <volist name="info.check_records" id="record">
                                        <span class="" style="display: block;">{$record.text}</span>
                                    </volist>
                                <else/>
                                    <span>无记录</span>
                                </if>
                            </div>
                        </div>
    
                        <div class='<eq name="_GET.type" value="check">disable</eq>'>
                            <gt name="info.id" value="0">
                                <div class="hr-line-dashed"></div>
                
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">推荐</label>
                                    <div class="col-sm-10">
                                        <volist name=":C('DOCUMENT_POSITION')" id="position">
                                            <label class="checkbox-inline">
                                                <input type="checkbox" value="{$key}" name="position[]" style="height: 25px;" <if condition="check_position($info['position'],$key)" >checked="checked"</if>>
                                                {$position}
                                            </label>
                                        </volist>
                                        <span class="help-block m-b-none">设置推荐位</span>
                                    </div>
                                </div>
                            </gt>
            
                            <div class="hr-line-dashed"></div>
            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">名称</label>
                                <div class="col-sm-10">
                                    <input name="title" type="text" class="form-control" value="{$info.title|default=''}">
                                    <span class="help-block m-b-none">填写培训机构名称</span>
                                </div>
                            </div>
            
                            <div class="hr-line-dashed"></div>
            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">地区</label>
                
                                <div class="col-sm-10">
                                    <select name="did" class="form-control m-b" name="account">
                                        <volist name="districts" id="district">0
                                            <option value="{$district.id}" <eq name="district['id']" value="$info['did']">selected</eq>>{$district.title}</option>
                                        </volist>
                                    </select>
                                    <span class="help-block m-b-none">选择培训机构所属地区</span>
                                </div>
                            </div>
            
                            <div class="hr-line-dashed"></div>
            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">地址</label>
                                <div class="col-sm-10">
                                    <input name="address" type="text" class="form-control" value="{$info.address|default=''}">
                                    <span class="help-block m-b-none">填写培训机构地址</span>
                                </div>
                            </div>
            
                            <div class="hr-line-dashed"></div>
            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">电话</label>
                                <div class="col-sm-10">
                                    <input name="phone" type="text" class="form-control" value="{$info.phone|default=''}">
                                    <span class="help-block m-b-none">填写培训机构的联系电话</span>
                                </div>
                            </div>
            
                            <div class="hr-line-dashed"></div>
            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">简介</label>
                                <div class="col-sm-10">
                                    <textarea name="description" class="form-control" rows="4">{$info.description|default=''}</textarea>
                                    <span class="help-block m-b-none">填写培训机构的简介</span>
                                </div>
                            </div>
            
                            <div class="hr-line-dashed"></div>
            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">详情</label>
                                <div class="col-sm-10">
                                    <textarea id="content" name="content" style="width:100%;height:240px;">{$info['content']}</textarea>
                                    <link href="__STATIC__/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
                                    <script type="text/javascript" src="__STATIC__/umeditor/third-party/template.min.js"></script>
                                    <!-- 配置文件 -->
                                    <script type="text/javascript" src="__STATIC__/umeditor/umeditor.config.js"></script>
                                    <!-- 编辑器源码文件 -->
                                    <script type="text/javascript" src="__STATIC__/umeditor/umeditor.min.js"></script>
                                    <script type="text/javascript" src="__STATIC__/umeditor/lang/zh-cn/zh-cn.js"></script>
                                    <!-- 实例化编辑器 -->
                                    <script type="text/javascript">
                                        //实例化编辑器
                                        var um_content = UM.getEditor('content',{
                                            imageUrl:"{:U('File/editor')}",
                                            imagePath:""
                                        });
                                    </script>
                                    <span class="help-block m-b-none">填写培训机构的详情</span>
                                </div>
                            </div>
            
                            <div class="hr-line-dashed"></div>
        
    
                        </div>
        
                        <input type="hidden" name="id" value="{$info.id|default=''}"/>
        
        
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">保存内容</button>
                                <button class="btn btn-white" type="submit" onclick="window.history.go(-1);">取消</button>
                            </div>
                        </div>
                    </form>
                </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End Panel Other -->
</div>
<include file="Common/footer"/>
<script src="__JS__/content.min.js?v=1.0.0"></script>
<script src="__JS__/plugins/iCheck/icheck.min.js"></script>
<script>
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    $(function(){
        var disable = $(".disable"),
            inputs = disable.find("input"),
            radios = disable.find("radio"),
            selects = disable.find("select"),
            checkboxs = disable.find("checkbox"),
            textareas = disable.find("textarea"),
            editors = disable.find(".edui-body-container"),
            others = disable.find("*");
        console.log(editors);
        disable.hide();
        disable.css({cursor:'not-allowed'});
        inputs.attr("disabled","disabled");
        radios.attr("disabled","disabled");
        checkboxs.attr("disabled","disabled");
        selects.attr("disabled","disabled");
        textareas.attr("disabled","disabled");
        editors.attr("contenteditable","false");
        others.css({"cursor":'not-allowed'});
    });
</script>
</body>
</html>
